package com.clwl.supervise.superviseapp.entity.base;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

import java.io.Serializable;

@Data
@TableName(value = "TS_USER")
//@KeySequence("TP_SEQ_USER")
public class TsUser implements Serializable {


    @TableId(value = "ID", type = IdType.AUTO)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @JsonIgnore
    @TableField(value = "DELETE_FLAG")
    private Long deleteFlag;
    /**
     * 0-全部；1-区局；2-监管所; 3-仅自己
     */
    @TableField(value = "DATA_RANGE")
    private String dataRange;

    @TableField(value = "ENFORCEMENT_NO")
    private String enforcementNo;

    @JsonIgnore
    @TableField(value = "EXPRIE_DATE")
    private String exprieDate;

    @JsonIgnore
    @TableField(value = "LEGAL_INSTRUMENT_CODE")
    private String legalInstrumentCode;

    @JsonIgnore
    @TableField(value = "LOGIN_NAME")
    private String loginName;

    @TableField(value = "MOBILE")
    private String mobile;

    @TableField(value = "NAME")
    private String name;

    @JsonIgnore
    @TableField(value = "PASSWORD")
    private String password;

    @TableField(value = "PIC_URL")
    private String picUrl;

    @TableField(value = "POSITION_NAME")
    private String positionName;

    @JsonIgnore
    @TableField(value = "SALT")
    private String salt;

    @TableField(value = "SUPERVISOR_ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long supervisorId;

    @TableField(value = "TEL")
    private String tel;

    /**
     * 1-组织负责人；2-普通员工
     */
    @TableField(value = "TYPE")
    private String type;

    @TableField(value = "DEPT_ID")
    private Long deptId;
    /** 禁用状态0-未禁用；1-已禁用 */
    @TableField(value = "DISABLED_STATUS")
    private String disabledStatus;

    /**
     * 职务编码
     */
    @TableField(value = "POSITION_CODE")
    private String positionCode;

    /**
     *  '包保级别(1-省级；2-市级；3-县级;4-乡级)'
     */
    @TableField(value = "BB_GRADE")
    private String bbGrade;

    /**
     * 所属区域
     */
    @TableField(value = "AREA_ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long areaId;

    /**
     * 1.经营 2.生产 3.特食
     */
    @TableField(value = "BUSINESS_FORMAT_RANGE")
    private String businessFormatRange;

    /**
     * token
     */
    @TableField(exist = false)
    private String token;
    /**
     * 所属区域名称
     */
    @TableField(exist = false)
    private String areaName;
    /**
     * 所属部门名称
     */
    @TableField(exist = false)
    private String deptName;
    /**
     *  页面显示用
     */
    @TableField(exist = false)
    private String text;
    /**页面显示用
     *
     */
    @TableField(exist = false)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long value;

    private static final long serialVersionUID = 1L;
}
